home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12568 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.crystalball.com!news
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.arch.embedded,comp.lang.c
  4. Subject: Re: Using malloc of C on embedded system?
  5. Date: Mon, 01 Apr 1996 11:26:28 -0600
  6. Organization: ...
  7. Message-ID: <316011C4.14F7@oc.com>
  8. References: <4jml7h$cbc@castor.usc.edu> <4jmr2uINN3cm@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: external.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Kazimir Kylheku wrote:
  16.  > 
  17.  > In article <4jml7h$cbc@castor.usc.edu>,
  18.  > Stannon Yen <chuitiny@castor.usc.edu> wrote:
  19.  > >Is it possible to use C function malloc and free on system that has no OS?
  20.  > >How can I setup the memory pool for dynamic allocation/deallocation of memory?
  21.  
  22.  > 
  23.  > Here is where the ISO standard's distinction between a ``hosted'' and
  24.  > ``freestanding'' implementation comes in handy.
  25.  > Presumably, the embedded development environment is freestanding, which means
  26.  > that you are allowed to define your own malloc() function with external
  27.  > linkage.
  28.  > 
  29.  
  30.  
  31. This "freestanding" aspect is something we don't talk too much about here.
  32. All treatment of any function is implementation or user defined. 
  33. Even   void main()  is allowed.   8-)
  34.  
  35. When reading K&R2 or the Schildt books, just keep telling yourself "this is
  36. written with respect to a freestanding implementation, so they can say anything
  37. they want about their implementation of the library".
  38.